x86/MCE: Export memory_error()
authorBorislav Petkov <bp@suse.de>
Fri, 19 May 2017 09:39:09 +0000 (11:39 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:52:33 +0000 (02:52 +0000)
commite42ed4d9de3f6ec03c4e62ddff49eac3e15aa32d
treee263ed6a34eb48a89575d3fd9901ebc98f4cc4da
parent85f6ead3f3dd528b5fb9626d09a0568d8f3f2913
x86/MCE: Export memory_error()

commit 2d1f406139ec20320bf38bcd2461aa8e358084b5 upstream.

Export the function which checks whether an MCE is a memory error to
other users so that we can reuse the logic. Drop the boot_cpu_data use,
while at it, as mce.cpuvendor already has the CPU vendor in there.

Integrate a piece from a patch from Vishal Verma
<vishal.l.verma@intel.com> to export it for modules (nfit).

The main reason we're exporting it is that the nfit handler
nfit_handle_mce() needs to detect a memory error properly before doing
its recovery actions.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Link: http://lkml.kernel.org/r/20170519093915.15413-2-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/mce.h
arch/x86/kernel/cpu/mcheck/mce.c